<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition template="/template/template1.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.CreateAccountTitle}"></h:outputText>
        </ui:define>
        <ui:define name="content">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>

            <h:form>
                <p:panel id="panel1" header="Register Account" style="margin-bottom:10px;">  
                    <h:panelGrid columns="2">
                        <h:outputLabel value="Username: "/>
                        <p:inputText id="username" value="#{accountController.selected.username}" required="true" requiredMessage="No Username"/>

                        <h:outputLabel value="Password: "  />
                        <p:password id="password" value="#{accountController.selected.password}" required="true" requiredMessage="No Username"/>

                        <h:outputLabel value="Full Name: "/>
                        <p:inputText id="fullname" value="#{accountController.user.fullname}" required="true" requiredMessage="No Username"/>

                        <h:outputLabel value="Address: " />
                        <p:inputText id="address" value="#{accountController.user.address}" required="true" requiredMessage="No Username"/>

                        <h:outputLabel value="Email: "  />
                        <p:inputText id="email" value="#{accountController.user.email}" required="true" requiredMessage="No Username"/>

                        <h:outputLabel value="Phone: " />
                        <p:inputText id="phone" value="#{accountController.user.phone}" required="true" requiredMessage="No Username"/>

                        <h:outputLabel value="Birthday: "  />
                        <p:calendar value="#{accountController.user.birthday}" id="popupButtonCal" showOn="button" />  

                        <h:outputLabel value="Gender: " />
                        <p:selectOneRadio id="gender" value="#{accountController.user.gender}">  
                            <f:selectItem itemLabel="Male" itemValue="True" />  
                            <f:selectItem itemLabel="Female" itemValue="False" />  
                        </p:selectOneRadio>  


                        <h:outputText value="Type: :" />  
                        <p:selectOneMenu value="#{accountController.temp}" requiredMessage="aaaaaaaaaaaaaaa">  
                            <f:selectItem itemLabel="Select One" itemValue="" />  
                            <f:selectItem itemLabel="Buyer" itemValue="2" />  
                            <f:selectItem itemLabel="Seller" itemValue="3" />     
                        </p:selectOneMenu>  
                    </h:panelGrid>
                    <br />
                    <p:commandButton action="#{accountController.register()}" value="#{bundle.CreateAccountSaveLink}" />

                    <p:commandButton value="Reset" update="panel1" process="@this"  >  
                        <p:resetInput target="panel1" />  
                    </p:commandButton>   
                </p:panel>  
            </h:form>
        </ui:define>
    </ui:composition>


</html>

